package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.SysUserRoleService;
import com.atguigu.spzx.model.vo.common.Result;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author LT
 * @create 2024-03-14-10:23
 */
@RestController
@Tag(name = "用户角色管理模块")
@RequestMapping("/admin/system/sysRoleUser")
public class SysUserRoleController {

    @Resource
    SysUserRoleService sysUserRoleService;

    @PutMapping("/doassign/{id}")
    public Result doAssignUserRole(@PathVariable("id") Integer id,
                                   @RequestParam("roleIds") List<Long> roleIds
    ){
        System.out.println(roleIds.toString());
        sysUserRoleService.doAssignUserRole(id,roleIds);
        return Result.ok();
    }





}
